<extend name="Public/base"/>

<block name="style">
	<link rel="stylesheet" href="__STATIC__/plugins/data-tables/DT_bootstrap.css" />
</block>

<block name="body">
    
    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="fa fa-globe"></i>导航管理</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                        <a href="#portlet-config" data-toggle="modal" class="config"></a>
                        <a href="javascript:;" class="reload"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="table-toolbar">
                        <div class="btn-group">
                            <a class="btn green" href="{:U('add','pid='.$pid)}">新 增</a>
                            <a class="btn green" href="javascript:;">删 除</a>
                            <a class="btn green" href="{:U('sort',array('pid'=>I('get.pid',0)),'')}">排序</a>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="sample">
                        <thead>
                            <tr>
                                <th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample .checkboxes" /></th>
                                <th>ID</th>
                                <th>导航名称</th>
                                <th>导航地址</th>
                                <th>排序</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        <volist name="list" id="channel">
                            <tr class="odd gradeX">
                                <td><input class="ids checkboxes" type="checkbox" name="" id="" value="{$channel['id']}"> </td>
                                <td>{$channel.id}</td>
                                <td><a href="{:U('index?pid='.$channel['id'])}">{$channel.title}</a></td>
                                <td>{$channel.url}</td>
                                <td>{$channel.sort}</td>
                                <td>
                                    <a title="编辑" href="{:U('edit?id='.$channel['id'].'&pid='.$pid)}">编辑</a>
                                    <a href="{:U('setStatus?ids='.$channel['id'].'&status='.abs(1-$channel['status']))}" class="ajax-get">{$channel.status|show_status_op}</a>
                                    <a class="confirm ajax-get" title="删除" href="{:U('del?id='.$channel['id'])}">删除</a>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                    
                    <div class="page">
                        {$_page}
                    </div>
                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
</block>

<block name="script">
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="__STATIC__/plugins/data-tables/jquery.dataTables.js"></script>
	<script type="text/javascript" src="__STATIC__/plugins/data-tables/DT_bootstrap.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="__STATIC__/scripts/app.js"></script>
	<script src="__STATIC__/scripts/table-managed.js"></script>     
	<script>
		jQuery(document).ready(function() {       
		   App.init();
		   TableManaged.init();
		});
	</script>
</block>